package com.cskaoyan.mapper;

import com.cskaoyan.bean.system.Perm;
import com.cskaoyan.bean.system.Permissions;
import com.cskaoyan.bo.system.PermsUpdateBo;
import com.cskaoyan.vo.system.PermissionsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermissionMapper {
    int insertPerm1(@Param("perm") Permissions perm);

    int insertPerm2(@Param("perm") Permissions.ChildrenBeanX beanX, @Param("cid") Integer cid);

    int insertPerm3(@Param("perm") Permissions.ChildrenBeanX.ChildrenBean bean, @Param("cid") Integer cid);

    List<Perm> selectAllPerms();

    List<String> selectPermByRid(@Param("rid") Integer roleId);

    List<String> selectPermByRids(@Param("roleIds") Integer[] roleIds);

    int deleteByRoleId(@Param("roleId") int roleId);

    int addPerms(@Param("perms") List<String> permissions, @Param("roleId") int roleId);

    List<PermissionsVo.SystemPermissionsBean> selectPerm1();

    List<PermissionsVo.SystemPermissionsBean.ChildrenBeanX> selectPerm2(@Param("id") String id);

    List<PermissionsVo.SystemPermissionsBean.ChildrenBeanX.ChildrenBean> selectPerm3(@Param("id") String id);

    List<String> seletSuperAdminPerms();

    List<String> selectAPIByRids(@Param("roleIds") Integer[] roleIds);

    List<String> selectSuperAPI();



    //
    // int insertPerm1(@Param("perms") List<Permissions> perms);
    //
    // int insertPerm2(@Param("permList2") List<Permissions.ChildrenBeanX> permList2, @Param("pid") Integer pid);
    //
    // int insertPerm3(@Param("permList3") List<Permissions.ChildrenBeanX.ChildrenBean> permList3, @Param("id") Integer pid);

}
